//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.cykj.management.common;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class SharedConfig {
    private static SharedConfig a;
    private SharedPreferences b;
    private Editor c;

    private SharedConfig() {
    }

    private SharedConfig(Context var1) {
        this.b = var1.getSharedPreferences("CONFIG", 0);
        this.c = this.b.edit();
    }

    public static SharedConfig getInstance(Context var0) {
        if (a == null) {
            a = new SharedConfig(var0);
        }

        return a;
    }

    public boolean writeData(String var1, String var2) {
        boolean var3 = false;
        this.c.putString(var1, var2);
        var3 = this.c.commit();
        return var3;
    }

    public boolean writeData(String var1, int var2) {
        boolean var3 = false;
        this.c.putInt(var1, var2);
        var3 = this.c.commit();
        return var3;
    }

    public boolean writeData(String var1, boolean var2) {
        boolean var3 = false;
        this.c.putBoolean(var1, var2);
        var3 = this.c.commit();
        return var3;
    }

    public String readString(String var1, String var2) {
        String var3 = this.b.getString(var1, var2);
        return var3;
    }

    public int readInt(String var1, int var2) {
        int var3 = this.b.getInt(var1, var2);
        return var3;
    }

    public boolean readBoolean(String var1, boolean var2) {
        boolean var3 = this.b.getBoolean(var1, var2);
        return var3;
    }

    public boolean deleteItem(String var1) {
        boolean var2 = false;
        this.c.remove(var1);
        var2 = this.c.commit();
        return var2;
    }

    public boolean isExist(String var1) {
        boolean var2 = false;
        var2 = this.b.contains(var1);
        return var2;
    }

    public void clearConfig() {
        this.c.clear().commit();
    }
}
